import App from './App'
import uvUI from '@/uni_modules/uv-ui'
// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
	...App
})
app.$mount()
// #endif
// #ifdef VUE3
import { createSSRApp, nextTick } from 'vue'
export function createApp() {
	const app = createSSRApp(App)
	app.use(uvUI)
	return {
		app
	}
}
// H5中路由重写
__uniRoutes.forEach(route => {
	if (route.path == "/") {
		return;
	}
	const arr = route.path.split("/");
	const path = arr[2] != arr[3] ? `/${arr[2]}/${arr[3]}` : `/${arr[2]}`;
	__uniRoutes.push({
		...route,
		path
	})
	route.redirect = path;
})
// #endif